<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Session相关方法</title>
</head>
<body>
<%
out.print("application.isNew():" + session.isNew()+"<br>");
out.print("application.getId():" + session.getId()+"<br>");
out.print("application.getLastAccessedTime():" + session.getLastAccessedTime()+"<br>");
out.print("application.getMaxInactiveInterval():" + session.getMaxInactiveInterval()+"<br>");
session.setAttribute("name", "tom");
out.print("name = " + session.getAttribute("name")+"<br>");
%>
</body>
</html>